/* ====================================== */
/* CSS for control sap.m/SegmentedButton  */
/* BlueCrystal theme                      */
/* ====================================== */

.sapMSegBBtn:last-child {
	border-right: 1px solid @sapUiSegmentedButtonBorderColor;
}

/* Custom focus outline: */
html.sap-desktop {
	.sapMSegBBtnFocusable:focus {
		outline: none;
		border:  1px dotted @sapUiContentFocusColor;
	}

	.sapMSegBBtnFocusable.sapMSegBBtnSel:focus {
		outline: none;
		border:  1px dotted @sapUiContentContrastFocusColor;
	}

	.sapMSegBBtnFocusable:focus + .sapMSegBBtn{
		outline: none;
		border-left: 1px solid transparent;
	}

	.sapMSegBBtnFocusable.sapMSegBBtnSel {
		&:focus  + .sapMSegBBtn {
			outline: none;
			border-left: 1px solid transparent;
		}
		// Fixes focus on shared border on the left that's why there is a negative margin
		+ .sapMSegBBtn:not(.sapMSegBBtnDis):focus {
			border-left: 1px dotted @sapUiContentFocusColor;
		}
	}

	.sapMSegBBtnFocusable:last-child:focus {
		border-right: 1px dotted @sapUiContentFocusColor;
	}

	.sapMSegBBtnFocusable.sapMSegBBtnSel:last-child:focus {
		border-right: 1px dotted @sapUiContentContrastFocusColor;
	}

	.sapMFooter-CTX {
		.sapMSegBBtnFocusable:focus {
			border-color: @sapUiContentContrastFocusColor;
		}
		.sapMSegBBtnSel + .sapMSegBBtn:focus {
			border-left: 1px dotted @sapUiContentContrastFocusColor;
		}
		.sapMSegBBtnFocusable.sapMSegBBtnSel + .sapMSegBBtn:not(.sapMSegBBtnSel):focus {
			border-left: 1px dotted @sapUiContentContrastFocusColor;
		}
	}
}

/* Footer */
.sapMFooter-CTX .sapMSegBBtn {
	background-color: transparent;
	color: @sapUiContentContrastTextColor;
	&:not(.sapMSegBBtnSel) {
		border-right: 1px solid transparent;
	}
	&:last-child {
		border-right: 1px solid @sapUiSegmentedButtonBorderColor;
	}
	&:hover {
		background: @sapUiSegmentedButtonFooterHoverBackground;
	}
	.sapUiIcon {
		color: @sapUiContentContrastIconColor;
	}
	&.sapMBtnActive,
	&.sapMSegBBtnSel {
		background: @sapUiSegmentedButtonSelectedBackground;
		color: @sapUiSegmentedButtonSelectedTextColor;
		&:hover {
			background: @sapUiSegmentedButtonSelectedHoverBackground;
		}
	}
}

/* Compact size */
.sapUiSizeCompact {
	.sapMSegBBtn {
		height: 1.625rem;
		line-height: 1.5rem;
		padding-left: 0.4375rem;
		padding-right: 0.4375rem;
	}

	.sapMSegBBtn:first-child {
		border-top-left-radius: 0.125rem;
		border-bottom-left-radius: 0.125rem;
	}

	.sapMSegBBtn:last-child {
		border-top-right-radius: 0.125rem;
		border-bottom-right-radius: 0.125rem;
	}

	.sapMSegB {
		.sapMBtnIconLeft {
			margin-left: 0;
		}
		&.sapMSegBIcons .sapMSegBBtnMixed {
			img {
				padding: 0;
			}
		}
	}

}

/* Android size compact fix */
html[data-sap-ui-os^="Android4.1"][data-sap-ui-browser^="an"] {
	.sapUiSizeCompact .sapMSegBBtn img {
		margin-bottom: 0.128rem;
	}
}